//页面路由
window.location.href = 'http://www.baidu.com';

history.back();

//hash 路由
window.location = '#hash';
window.onhashChange = function(){
	console.log('current hash:',window.location.hash);
}

//h5路由
//推进一个状态
history.pushState('name','title','/path');
//替换一个状态
history.replaceState('name','title','/path');
//popstate
window.onpopstate = function(){
	console.log("href: ",window.location.href);
	console.log("hash: ",window.location.hash);
	console.log("pathname: ",window.location.pathname);
	console.log("search: ",window.location.search);
}